<?php 
echo "<meta charset=utf-8>";
echo "<a href='add.html'>添加新留言</a><br/><br/>";
//打开用于存储留言的 XML文件 
$guestbook = simplexml_load_file('DB/guestbook.xml'); 
foreach($guestbook->thread as $th) //循环读取 XML数据中的每一个 thread标签 
{ 
	echo "<B>标题：</B>".$th->title."<BR>"; 
	echo "<B>作者：</B>".$th->author."<BR>"; 
	echo "<B>内容：</B><PRE>".$th->content."</PRE>"; 
	echo "<a href='./delete.php?id=".$th->id."'>删除</a>&nbsp;&nbsp;";
	echo "<HR>"; 
} 
?> 
